\(\int \frac {(x+x^2)^{3/2}}{1+x^2} \, dx\) [93]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [B] (verified)
   Fricas [C] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F(-2)]
   Mupad [F(-1)]

Optimal result

Integrand size = 17, antiderivative size = 130 \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\frac {1}{4} (5+2 x) \sqrt {x+x^2}+\sqrt {1+\sqrt {2}} \arctan \left (\frac {1+\sqrt {2}-x}{\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+x^2}}\right )-\sqrt {-1+\sqrt {2}} \text {arctanh}\left (\frac {1-\sqrt {2}-x}{\sqrt {2 \left (-1+\sqrt {2}\right )} \sqrt {x+x^2}}\right )-\frac {5}{4} \text {arctanh}\left (\frac {x}{\sqrt {x+x^2}}\right ) \]

[Out]

-5/4*arctanh(x/(x^2+x)^(1/2))+1/4*(5+2*x)*(x^2+x)^(1/2)-arctanh((1-x-2^(1/2))/(x^2+x)^(1/2)/(-2+2*2^(1/2))^(1/
2))*(2^(1/2)-1)^(1/2)+arctan((1-x+2^(1/2))/(x^2+x)^(1/2)/(2+2*2^(1/2))^(1/2))*(1+2^(1/2))^(1/2)

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.529, Rules used = {992, 1092, 634, 212, 12, 1050, 1044, 213, 209} \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\sqrt {1+\sqrt {2}} \arctan \left (\frac {-x+\sqrt {2}+1}{\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x^2+x}}\right )-\sqrt {\sqrt {2}-1} \text {arctanh}\left (\frac {-x-\sqrt {2}+1}{\sqrt {2 \left (\sqrt {2}-1\right )} \sqrt {x^2+x}}\right )-\frac {5}{4} \text {arctanh}\left (\frac {x}{\sqrt {x^2+x}}\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5) \]

[In]

Int[(x + x^2)^(3/2)/(1 + x^2),x]

[Out]

((5 + 2*x)*Sqrt[x + x^2])/4 + Sqrt[1 + Sqrt[2]]*ArcTan[(1 + Sqrt[2] - x)/(Sqrt[2*(1 + Sqrt[2])]*Sqrt[x + x^2])
] - Sqrt[-1 + Sqrt[2]]*ArcTanh[(1 - Sqrt[2] - x)/(Sqrt[2*(-1 + Sqrt[2])]*Sqrt[x + x^2])] - (5*ArcTanh[x/Sqrt[x
 + x^2]])/4

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 634

Int[1/Sqrt[(b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(1 - c*x^2), x], x, x/Sqrt[b*x + c*x^2
]], x] /; FreeQ[{b, c}, x]

Rule 992

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)*((d_.) + (f_.)*(x_)^2)^(q_), x_Symbol] :> Simp[(b*(3*p + 2*q) + 2
*c*(p + q)*x)*(a + b*x + c*x^2)^(p - 1)*((d + f*x^2)^(q + 1)/(2*f*(p + q)*(2*p + 2*q + 1))), x] - Dist[1/(2*f*
(p + q)*(2*p + 2*q + 1)), Int[(a + b*x + c*x^2)^(p - 2)*(d + f*x^2)^q*Simp[b^2*d*(p - 1)*(2*p + q) - (p + q)*(
b^2*d*(1 - p) - 2*a*(c*d - a*f*(2*p + 2*q + 1))) - (2*b*(c*d - a*f)*(1 - p)*(2*p + q) - 2*(p + q)*b*(2*c*d*(2*
p + q) - (c*d + a*f)*(2*p + 2*q + 1)))*x + (b^2*f*p*(1 - p) + 2*c*(p + q)*(c*d*(2*p - 1) - a*f*(4*p + 2*q - 1)
))*x^2, x], x], x] /; FreeQ[{a, b, c, d, f, q}, x] && NeQ[b^2 - 4*a*c, 0] && GtQ[p, 1] && NeQ[p + q, 0] && NeQ
[2*p + 2*q + 1, 0] &&  !IGtQ[p, 0] &&  !IGtQ[q, 0]

Rule 1044

Int[((g_) + (h_.)*(x_))/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[-2*
a*g*h, Subst[Int[1/Simp[2*a^2*g*h*c + a*e*x^2, x], x], x, Simp[a*h - g*c*x, x]/Sqrt[d + e*x + f*x^2]], x] /; F
reeQ[{a, c, d, e, f, g, h}, x] && EqQ[a*h^2*e + 2*g*h*(c*d - a*f) - g^2*c*e, 0]

Rule 1050

Int[((g_.) + (h_.)*(x_))/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> With[{q
 = Rt[(c*d - a*f)^2 + a*c*e^2, 2]}, Dist[1/(2*q), Int[Simp[(-a)*h*e - g*(c*d - a*f - q) + (h*(c*d - a*f + q) -
 g*c*e)*x, x]/((a + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] - Dist[1/(2*q), Int[Simp[(-a)*h*e - g*(c*d - a*f + q
) + (h*(c*d - a*f - q) - g*c*e)*x, x]/((a + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x]] /; FreeQ[{a, c, d, e, f, g,
 h}, x] && NeQ[e^2 - 4*d*f, 0] && NegQ[(-a)*c]

Rule 1092

Int[((A_.) + (B_.)*(x_) + (C_.)*(x_)^2)/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Sym
bol] :> Dist[C/c, Int[1/Sqrt[d + e*x + f*x^2], x], x] + Dist[1/c, Int[(A*c - a*C + B*c*x)/((a + c*x^2)*Sqrt[d
+ e*x + f*x^2]), x], x] /; FreeQ[{a, c, d, e, f, A, B, C}, x] && NeQ[e^2 - 4*d*f, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{4} (5+2 x) \sqrt {x+x^2}-\frac {1}{2} \int \frac {\frac {5}{4}+4 x+\frac {5 x^2}{4}}{\left (1+x^2\right ) \sqrt {x+x^2}} \, dx \\ & = \frac {1}{4} (5+2 x) \sqrt {x+x^2}-\frac {1}{2} \int \frac {4 x}{\left (1+x^2\right ) \sqrt {x+x^2}} \, dx-\frac {5}{8} \int \frac {1}{\sqrt {x+x^2}} \, dx \\ & = \frac {1}{4} (5+2 x) \sqrt {x+x^2}-\frac {5}{4} \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {x+x^2}}\right )-2 \int \frac {x}{\left (1+x^2\right ) \sqrt {x+x^2}} \, dx \\ & = \frac {1}{4} (5+2 x) \sqrt {x+x^2}-\frac {5}{4} \tanh ^{-1}\left (\frac {x}{\sqrt {x+x^2}}\right )+\frac {\int \frac {-1+\left (-1-\sqrt {2}\right ) x}{\left (1+x^2\right ) \sqrt {x+x^2}} \, dx}{\sqrt {2}}-\frac {\int \frac {-1+\left (-1+\sqrt {2}\right ) x}{\left (1+x^2\right ) \sqrt {x+x^2}} \, dx}{\sqrt {2}} \\ & = \frac {1}{4} (5+2 x) \sqrt {x+x^2}-\frac {5}{4} \tanh ^{-1}\left (\frac {x}{\sqrt {x+x^2}}\right )+\left (-2+\sqrt {2}\right ) \text {Subst}\left (\int \frac {1}{2 \left (1-\sqrt {2}\right )+x^2} \, dx,x,\frac {-1+\sqrt {2}+x}{\sqrt {x+x^2}}\right )-\left (2+\sqrt {2}\right ) \text {Subst}\left (\int \frac {1}{2 \left (1+\sqrt {2}\right )+x^2} \, dx,x,\frac {-1-\sqrt {2}+x}{\sqrt {x+x^2}}\right ) \\ & = \frac {1}{4} (5+2 x) \sqrt {x+x^2}+\sqrt {1+\sqrt {2}} \tan ^{-1}\left (\frac {1+\sqrt {2}-x}{\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+x^2}}\right )-\sqrt {-1+\sqrt {2}} \tanh ^{-1}\left (\frac {1-\sqrt {2}-x}{\sqrt {2 \left (-1+\sqrt {2}\right )} \sqrt {x+x^2}}\right )-\frac {5}{4} \tanh ^{-1}\left (\frac {x}{\sqrt {x+x^2}}\right ) \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 0.11 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.93 \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\frac {\sqrt {x} \sqrt {1+x} \left (\sqrt {x} \sqrt {1+x} (5+2 x)+5 \log \left (-\sqrt {x}+\sqrt {1+x}\right )+8 \text {RootSum}\left [16+32 \text {$\#$1}+16 \text {$\#$1}^2+\text {$\#$1}^4\&,\frac {\log \left (-2 x+2 \sqrt {x} \sqrt {1+x}+\text {$\#$1}\right ) \text {$\#$1}^2}{8+8 \text {$\#$1}+\text {$\#$1}^3}\&\right ]\right )}{4 \sqrt {x (1+x)}} \]

[In]

Integrate[(x + x^2)^(3/2)/(1 + x^2),x]

[Out]

(Sqrt[x]*Sqrt[1 + x]*(Sqrt[x]*Sqrt[1 + x]*(5 + 2*x) + 5*Log[-Sqrt[x] + Sqrt[1 + x]] + 8*RootSum[16 + 32*#1 + 1
6*#1^2 + #1^4 & , (Log[-2*x + 2*Sqrt[x]*Sqrt[1 + x] + #1]*#1^2)/(8 + 8*#1 + #1^3) & ]))/(4*Sqrt[x*(1 + x)])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(266\) vs. \(2(98)=196\).

Time = 4.60 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.05

method result size
pseudoelliptic \(-\frac {\left (\left (-\frac {\sqrt {2}}{2}+1\right ) \ln \left (\frac {\sqrt {2}\, x -\sqrt {\left (1+x \right ) x}\, \sqrt {2+2 \sqrt {2}}+x +1}{x}\right )+\left (\frac {\sqrt {2}}{2}-1\right ) \ln \left (\frac {\sqrt {2}\, x +\sqrt {\left (1+x \right ) x}\, \sqrt {2+2 \sqrt {2}}+x +1}{x}\right )-\frac {5 \sqrt {-2+2 \sqrt {2}}\, \ln \left (\frac {\sqrt {\left (1+x \right ) x}-x}{x}\right )}{8}+\frac {5 \sqrt {-2+2 \sqrt {2}}\, \ln \left (\frac {x +\sqrt {\left (1+x \right ) x}}{x}\right )}{8}-\frac {\sqrt {-2+2 \sqrt {2}}\, \left (x +\frac {5}{2}\right ) \sqrt {\left (1+x \right ) x}}{2}+\sqrt {2}\, \left (\arctan \left (\frac {\sqrt {2+2 \sqrt {2}}\, x -2 \sqrt {\left (1+x \right ) x}}{x \sqrt {-2+2 \sqrt {2}}}\right )-\arctan \left (\frac {\sqrt {2+2 \sqrt {2}}\, x +2 \sqrt {\left (1+x \right ) x}}{x \sqrt {-2+2 \sqrt {2}}}\right )\right )\right ) x^{2}}{\sqrt {-2+2 \sqrt {2}}\, \left (x +\sqrt {\left (1+x \right ) x}\right )^{2} \left (-\sqrt {\left (1+x \right ) x}+x \right )^{2}}\) \(267\)
trager \(\left (\frac {5}{4}+\frac {x}{2}\right ) \sqrt {x^{2}+x}-\frac {5 \ln \left (1+2 x +2 \sqrt {x^{2}+x}\right )}{8}-\frac {\operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right ) \ln \left (-\frac {3 \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right ) \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{4} x -3 \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right ) \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{4}-128 \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right ) \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2} x -112 \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2} \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right )+384 \sqrt {x^{2}+x}\, \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}-768 \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right ) x -512 \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right )+7168 \sqrt {x^{2}+x}}{x \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}-\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+16 x}\right )}{4}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right ) \ln \left (\frac {3 x \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{5}-3 \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{5}+224 x \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{3}+16 \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{3}+384 \sqrt {x^{2}+x}\, \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+2048 x \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )+512 \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )-1024 \sqrt {x^{2}+x}}{x \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}-\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}-16}\right )}{4}\) \(475\)
risch \(\frac {\left (5+2 x \right ) \left (1+x \right ) x}{4 \sqrt {\left (1+x \right ) x}}-\frac {5 \ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )}{8}+\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}\, \sqrt {2}\, \left (\sqrt {-2+2 \sqrt {2}}\, \arctan \left (\frac {\sqrt {-2+2 \sqrt {2}}\, \sqrt {\left (3 \sqrt {2}-4\right ) \left (-\frac {\left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+12 \sqrt {2}+17\right )}\, \left (\frac {24 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+\frac {17 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\sqrt {2}\right ) \left (-\sqrt {2}-1+x \right ) \left (3 \sqrt {2}-4\right )}{2 \left (-\sqrt {2}+1-x \right ) \left (\frac {\left (-\sqrt {2}-1+x \right )^{4}}{\left (-\sqrt {2}+1-x \right )^{4}}-\frac {34 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+1\right )}\right ) \sqrt {1+\sqrt {2}}\, \sqrt {2}-2 \sqrt {-2+2 \sqrt {2}}\, \arctan \left (\frac {\sqrt {-2+2 \sqrt {2}}\, \sqrt {\left (3 \sqrt {2}-4\right ) \left (-\frac {\left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+12 \sqrt {2}+17\right )}\, \left (\frac {24 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+\frac {17 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\sqrt {2}\right ) \left (-\sqrt {2}-1+x \right ) \left (3 \sqrt {2}-4\right )}{2 \left (-\sqrt {2}+1-x \right ) \left (\frac {\left (-\sqrt {2}-1+x \right )^{4}}{\left (-\sqrt {2}+1-x \right )^{4}}-\frac {34 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+1\right )}\right ) \sqrt {1+\sqrt {2}}-4 \,\operatorname {arctanh}\left (\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}}{2 \sqrt {1+\sqrt {2}}}\right ) \sqrt {2}+6 \,\operatorname {arctanh}\left (\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}}{2 \sqrt {1+\sqrt {2}}}\right )\right )}{2 \sqrt {-\frac {\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-3 \sqrt {2}-4}{\left (1+\frac {-\sqrt {2}-1+x}{-\sqrt {2}+1-x}\right )^{2}}}\, \left (1+\frac {-\sqrt {2}-1+x}{-\sqrt {2}+1-x}\right ) \left (3 \sqrt {2}-4\right ) \sqrt {1+\sqrt {2}}}\) \(788\)
default \(-\frac {5 \ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )}{8}+\frac {x \sqrt {x^{2}+x}}{2}+\frac {5 \sqrt {x^{2}+x}}{4}+\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}\, \sqrt {2}\, \left (\sqrt {-2+2 \sqrt {2}}\, \arctan \left (\frac {\sqrt {-2+2 \sqrt {2}}\, \sqrt {\left (3 \sqrt {2}-4\right ) \left (-\frac {\left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+12 \sqrt {2}+17\right )}\, \left (\frac {24 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+\frac {17 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\sqrt {2}\right ) \left (-\sqrt {2}-1+x \right ) \left (3 \sqrt {2}-4\right )}{2 \left (-\sqrt {2}+1-x \right ) \left (\frac {\left (-\sqrt {2}-1+x \right )^{4}}{\left (-\sqrt {2}+1-x \right )^{4}}-\frac {34 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+1\right )}\right ) \sqrt {1+\sqrt {2}}\, \sqrt {2}-2 \sqrt {-2+2 \sqrt {2}}\, \arctan \left (\frac {\sqrt {-2+2 \sqrt {2}}\, \sqrt {\left (3 \sqrt {2}-4\right ) \left (-\frac {\left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+12 \sqrt {2}+17\right )}\, \left (\frac {24 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+\frac {17 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\sqrt {2}\right ) \left (-\sqrt {2}-1+x \right ) \left (3 \sqrt {2}-4\right )}{2 \left (-\sqrt {2}+1-x \right ) \left (\frac {\left (-\sqrt {2}-1+x \right )^{4}}{\left (-\sqrt {2}+1-x \right )^{4}}-\frac {34 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+1\right )}\right ) \sqrt {1+\sqrt {2}}-4 \,\operatorname {arctanh}\left (\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}}{2 \sqrt {1+\sqrt {2}}}\right ) \sqrt {2}+6 \,\operatorname {arctanh}\left (\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}}{2 \sqrt {1+\sqrt {2}}}\right )\right )}{2 \sqrt {-\frac {\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-3 \sqrt {2}-4}{\left (1+\frac {-\sqrt {2}-1+x}{-\sqrt {2}+1-x}\right )^{2}}}\, \left (1+\frac {-\sqrt {2}-1+x}{-\sqrt {2}+1-x}\right ) \left (3 \sqrt {2}-4\right ) \sqrt {1+\sqrt {2}}}\) \(789\)

[In]

int((x^2+x)^(3/2)/(x^2+1),x,method=_RETURNVERBOSE)

[Out]

-1/(-2+2*2^(1/2))^(1/2)*((-1/2*2^(1/2)+1)*ln((2^(1/2)*x-((1+x)*x)^(1/2)*(2+2*2^(1/2))^(1/2)+x+1)/x)+(1/2*2^(1/
2)-1)*ln((2^(1/2)*x+((1+x)*x)^(1/2)*(2+2*2^(1/2))^(1/2)+x+1)/x)-5/8*(-2+2*2^(1/2))^(1/2)*ln((((1+x)*x)^(1/2)-x
)/x)+5/8*(-2+2*2^(1/2))^(1/2)*ln((x+((1+x)*x)^(1/2))/x)-1/2*(-2+2*2^(1/2))^(1/2)*(x+5/2)*((1+x)*x)^(1/2)+2^(1/
2)*(arctan(((2+2*2^(1/2))^(1/2)*x-2*((1+x)*x)^(1/2))/x/(-2+2*2^(1/2))^(1/2))-arctan(((2+2*2^(1/2))^(1/2)*x+2*(
(1+x)*x)^(1/2))/x/(-2+2*2^(1/2))^(1/2))))*x^2/(x+((1+x)*x)^(1/2))^2/(-((1+x)*x)^(1/2)+x)^2

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.33 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.02 \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\frac {1}{4} \, \sqrt {x^{2} + x} {\left (2 \, x + 5\right )} - \frac {1}{2} \, \sqrt {2 i - 2} \log \left (-2 \, x + \left (i + 1\right ) \, \sqrt {2 i - 2} + 2 \, \sqrt {x^{2} + x} - 2 i\right ) + \frac {1}{2} \, \sqrt {2 i - 2} \log \left (-2 \, x - \left (i + 1\right ) \, \sqrt {2 i - 2} + 2 \, \sqrt {x^{2} + x} - 2 i\right ) - \frac {1}{2} \, \sqrt {-2 i - 2} \log \left (-2 \, x - \left (i - 1\right ) \, \sqrt {-2 i - 2} + 2 \, \sqrt {x^{2} + x} + 2 i\right ) + \frac {1}{2} \, \sqrt {-2 i - 2} \log \left (-2 \, x + \left (i - 1\right ) \, \sqrt {-2 i - 2} + 2 \, \sqrt {x^{2} + x} + 2 i\right ) + \frac {5}{8} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} + x} - 1\right ) \]

[In]

integrate((x^2+x)^(3/2)/(x^2+1),x, algorithm="fricas")

[Out]

1/4*sqrt(x^2 + x)*(2*x + 5) - 1/2*sqrt(2*I - 2)*log(-2*x + (I + 1)*sqrt(2*I - 2) + 2*sqrt(x^2 + x) - 2*I) + 1/
2*sqrt(2*I - 2)*log(-2*x - (I + 1)*sqrt(2*I - 2) + 2*sqrt(x^2 + x) - 2*I) - 1/2*sqrt(-2*I - 2)*log(-2*x - (I -
 1)*sqrt(-2*I - 2) + 2*sqrt(x^2 + x) + 2*I) + 1/2*sqrt(-2*I - 2)*log(-2*x + (I - 1)*sqrt(-2*I - 2) + 2*sqrt(x^
2 + x) + 2*I) + 5/8*log(-2*x + 2*sqrt(x^2 + x) - 1)

Sympy [F]

\[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\int \frac {\left (x \left (x + 1\right )\right )^{\frac {3}{2}}}{x^{2} + 1}\, dx \]

[In]

integrate((x**2+x)**(3/2)/(x**2+1),x)

[Out]

Integral((x*(x + 1))**(3/2)/(x**2 + 1), x)

Maxima [F]

\[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\int { \frac {{\left (x^{2} + x\right )}^{\frac {3}{2}}}{x^{2} + 1} \,d x } \]

[In]

integrate((x^2+x)^(3/2)/(x^2+1),x, algorithm="maxima")

[Out]

integrate((x^2 + x)^(3/2)/(x^2 + 1), x)

Giac [F(-2)]

Exception generated. \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate((x^2+x)^(3/2)/(x^2+1),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Unable to divide, perhaps due to rounding error%%%{%%{poly1[29378258633931653019799718485334848549113596143
37236965430

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\int \frac {{\left (x^2+x\right )}^{3/2}}{x^2+1} \,d x \]

[In]

int((x + x^2)^(3/2)/(x^2 + 1),x)

[Out]

int((x + x^2)^(3/2)/(x^2 + 1), x)